<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Happy feet</title>
  <meta name="description" content="导航菜单设置">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <!-- <link rel="icon" type="image/png" href="assets/i/favicon.png"> -->
  <!-- <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png"> -->
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <% include("/pager/common/quote.html"){} %>  
</head>
<body>
<div class="admin-content">

  <div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">菜单管理</strong> / <small>导航菜单设置</small></div>
  </div>
  <hr/>
  <div class="am-g am-padding">
  	 
  	<div class="am-u-sm-12 am-u-md-6">
  		<div class="am-tabs" data-am-tabs id="admin-menus-tab">
  			<ul class="am-tabs-nav am-nav am-nav-tabs">
			    <li class="am-active"><a href="#lmenus_tab">左侧导航</a></li>
			    <li><a href="#tmenus_tab">顶部导航</a></li> 
			</ul>
			<div class="am-tabs-bd">
				<div class="am-tab-panel am-fade am-in am-active" data-type="2" id="lmenus_tab">
					
					<div class="am-g ">
						<div class="am-u-sm-12 am-padding-lg" >
							<i class="am-icon-tag"></i>
							可通过菜单上的操作进行管理相关菜单 ，在这里添加&nbsp;
							<button type="button"
							 class="am-btn am-btn-primary am-btn-sm" style="padding:5px; " onclick="addMainMenu()">
							 <i class="am-icon-sign-out"></i>主菜单</button>
						</div>
					</div>
					
					<div class="am-g" >
					  <!-- sidebar start -->
					  <div class=" am-u-sm-10 am-u-sm-centered"  >
					    	<ul class="am-list admin-sidebar-list" id="nav-menu-left" style="border:1px solid #cecece;">
					      	<%if(!isEmpty(lMenus)){%>
					      	<% for(menu in lMenus){  %>
					      		<% if(menu.childrens == null){%>
					      			<li><a href="javascript:void(0)" class="am-menu menu_a menu_disabled" id="menu_id_${menu.id}" data-id="${menu.id}" >
					      			<i class="${menu.icon} ${menu.status == 0 ? 'menu_disabled' : ''}" id="menu_icon_${menu.id}"></i>&nbsp;<span id="menu_name_${menu.id}" class="${menu.status == 0 ? 'menu_disabled' : ''}">${menu.name}</span>
					      				<span class="am-hide menu_edit_span" id="menu_edit_span_${menu.id}">
						 		 	 		<button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单" ></button>&nbsp;
						 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a admin-menu-del"  title="删除"></button>&nbsp;
						 		 		</span>
					      			</a> 
					      			</li>
					      		<%}else if(!isEmpty(menu.childrens)){%>
					      			<li class="admin-parent"><a class="am-cf am-menu am-text-danger" href="javascript:void(0)" id="menu_id_${menu.id}" data-id="${menu.id}"
					      				><span class="${menu.icon} ${menu.status == 0 ? 'menu_disabled' : ''}" id="menu_icon_${menu.id}"></span>&nbsp;<span id="menu_name_${menu.id}" class="${menu.status == 0 ? 'menu_disabled' : ''}">${menu.name}</span>
					      				<span class="am-hide  menu_edit_span " id="menu_edit_span_${menu.id}">
						 		 	 		<button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单" ></button>&nbsp;
						 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a admin-menu-del"  title="删除"  ></button>&nbsp;
						 		 		</span>
					      				<span class="am-icon-angle-right am-fr am-margin-right am-animation-fade" id="parent_icon_${menu.id}"></span></a>
					          			<ul class="am-list am-collapse admin-sidebar-sub" id="nav-menu${menu.id}">
					          				<% for(children in menu.childrens){%>
					          				<li><a href="javascript:void(0)" class="am-menu menu_a" id="menu_id_${children.id}" data-id="${children.id}" data-pid="${menu.id}" data-pname="${menu.name}">
					          				<span class="${children.icon} ${children.status == 0 ? 'menu_disabled' : ''}" id="menu_icon_${children.id}"></span>&nbsp;<span id="menu_name_${children.id}" class="${children.status == 0 ? 'menu_disabled' : ''}">${children.name}</span>
					          				<span class="am-hide  menu_edit_span " id="menu_edit_span_${children.id}">
							 		 	 		<!-- <button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单" ></button>&nbsp; -->
							 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a admin-menu-del"  title="删除" ></button>&nbsp;
							 		 		</span>
					          				</a></li>
					          				<%}%>
					          			</ul>
					          		</li>
					      		<%}%>
					      	<% }%>
					      	<% }else{%>
					      		<li class="am-text-center am-padding admin-menus-empty">暂无主菜单！ <button type="button" class="am-btn am-btn-link am-btn-sm" onclick="addMainMenu()">添加主菜单</button></li>
					      	<% }%>
					      </ul>
					  </div>
					</div>  
				</div>
				<div class="am-tab-panel am-fade" data-type="1" id="tmenus_tab"> 
					<div class="am-g ">
						<div class="am-u-sm-12 am-padding-lg"  >
							<i class="am-icon-tag"></i>
							可通过菜单上的操作进行管理相关菜单 ，在这里添加&nbsp;
							<button type="button"
							 class="am-btn am-btn-primary am-btn-sm" style="padding:5px; " onclick="addMainMenu()">
							 <i class="am-icon-sign-out"></i>主菜单</button>
						</div>
					</div>
					
					<div class="am-g" >
					  <!-- sidebar start -->
					  <div class=" am-u-sm-10 am-u-sm-centered"  >
					    	<ul class="am-list admin-sidebar-list" id="nav-menu-top" style="border:1px solid #cecece;">
					      	<%if(!isEmpty(hMenus)){%>
						      	<% for(menu in hMenus){  %>
						      		<% if(menu.childrens == null){%>
						      			<li><a href="javascript:void(0)" class="am-menu menu_a" id="menu_id_${menu.id}" data-id="${menu.id}" data-url="${menu.url}">
						      			<i class="${menu.icon} ${menu.status == 0 ? 'menu_disabled' : ''}" id="menu_icon_${menu.id}"></i> <span id="menu_name_${menu.id}" class="${menu.status == 0 ? 'menu_disabled' : ''}">${menu.name}</span>
						      				<span class="am-hide menu_edit_span" id="menu_edit_span_${menu.id}">
							 		 	 		<button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单"></button>&nbsp;
							 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a admin-menu-del"  title="删除" ></button>&nbsp;
							 		 		</span>
						      			</a> 
						      			</li>
						      		<%}else if(!isEmpty(menu.childrens)){%>
						      			<li class="admin-parent"><a class="am-cf am-menu" href="javascript:void(0)" data-id="${menu.id}" data-url="${menu.url}" 
						      				><span class="${menu.icon} ${menu.status == 0 ? 'menu_disabled' : ''} " id="menu_icon_${menu.id}"></span><span id="menu_name_${menu.id}" class="${menu.status == 0 ? 'menu_disabled' : ''}">${menu.name}</span>
						      				<span class="am-hide  menu_edit_span " id="menu_edit_span_${menu.id}">
							 		 	 		<button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单"  ></button>&nbsp;
							 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a admin-menu-del"  title="删除"  ></button>&nbsp;
							 		 		</span>
						      				<span class="am-icon-angle-right am-fr am-margin-right am-animation-fade" id="parent_icon_${menu.id}"></span></a>
						          			<ul class="am-list am-collapse admin-sidebar-sub" id="nav-menu${menu.id}">
						          				<% for(children in menu.childrens){%>
						          				<li><a href="javascript:void(0)" class="am-menu menu_a" data-id="${children.id}" data-pid="${menu.id}" data-pname="${menu.name}">
						          				<span class="${children.icon} ${children.status == 0 ? 'menu_disabled' : ''}" id="menu_icon_${children.id}"></span> <span id="menu_name_${children.id}" class="${children.status == 0 ? 'menu_disabled' : ''}">${children.name}</span>
						          				<span class="am-hide  menu_edit_span " id="menu_edit_span_${children.id}">
								 		 	 		<!-- <button class="am-btn am-btn-link am-icon-plus menu_edit_a admin-menu-add"   title="添加子菜单" ></button>&nbsp; -->
								 		 	 		<button class="am-btn am-btn-link am-text-danger am-icon-trash menu_edit_a del"  title="删除" ></button>&nbsp;
								 		 		</span>
						          				</a></li>
						          				<%}%>
						          			</ul>
						          		</li>
						      		<%}%>
						      	<% }%>
						      <%}else{%>
						      	  <li class="am-text-center am-padding admin-menus-empty">暂无主菜单！ <button type="button" class="am-btn am-btn-link am-btn-sm" onclick="addMainMenu()">添加主菜单</button></li>
						      <%}%>
					      </ul>
					  </div>
					</div>  
				</div>
			</div>
  		</div>
  	</div>
  	
  	
  	<div class="am-u-sm-12 am-u-md-6 am-margin-top-sm am-padding-top-lg">
  		<div class="am-panel am-panel-default am-padding">
  			<div class="am-panel-bd">
  				<div class="am-u-sm-12 am-u-sm-end am-margin-sm" >
					<i class="am-icon-tag"></i>
					导航菜单编辑 
				</div>
  				<div class="am-margin">
  					<form class="am-form am-form-horizontal " name="editForm" id="editForm" method="post" >
					    <div class="am-form-group " >
					      <input type="hidden"  name='id' id="edit_id"/>
					      <input type="hidden" name="type" id="edit_type" />
					      <input type="hidden" name="isParent" id="edit_isParent" value="0"/>
					      <label for="edit_menuName" class="am-u-sm-8 am-u-md-4 am-form-label">菜单名称</label>
					      <div class="am-u-sm-16 am-u-md-8 am-u-end">
					      	<input type="text" class="" id="edit_menuName" name="name" data-foolish-msg="菜单名称，不能为空！" placeholder="输入菜单名称" required />
					      </div>
					    </div>
					
					    <div class="am-form-group ">
					      <label for="edit_icon" class="am-u-sm-8 am-u-md-4 am-form-label">图标设置</label>
					      <div class="am-u-sm-4 am-u-md-2">
					      	 <a class="am-inline-block border_dash am-btn-default am-margin-right-sm" id="edit_icon_show" style="padding:5px;" href="javascript:void(0);"><i class="am-icon-picture-o"></i></a>
					      </div>
					      <div class="am-u-sm-12 am-u-md-6 am-u-end am-padding-left-xs" >
					      	<input type="text" class="" id="edit_icon"  name="icon" placeholder="菜单图标设置" >
					      </div>
					    </div> 
						<div class="am-form-group">
					      <label for="edit_url" class="am-u-sm-8 am-u-md-4 am-form-label">URL</label>
					      <div class="am-u-sm-16 am-u-md-8 am-u-end" >
					      	<input type="text" class="" id="edit_url"  name="url" placeholder="URL地址" >
					      </div>
					    </div> 
					    <div class="am-form-group">
					      <label for="edit_parentID" class="am-u-sm-8 am-u-md-4 am-form-label">上级菜单</label>
					      <div class="am-u-sm-16 am-u-md-8 am-u-end" >
					      	<input type="hidden" name="parentID" id="edit_parentID"/>
					      	<input type="text" name="parentName" id="edit_parentName" disabled/>
					      </div>
					    </div>
					    
					    <div class="am-form-group">
					      <label for="edit_sort" class="am-u-sm-8 am-u-md-4 am-form-label">排序</label>
					      <div class="am-u-sm-16 am-u-md-8 am-u-end" >
					      	<input type="text" class="" id="edit_sort"  name="sort" placeholder="排序">
					      </div>
					    </div>
					    
					    
					    <div class="am-form-group">
					      <label for="edit_status1" class="am-u-sm-8 am-u-md-4 am-form-label">状态</label>
					      <div class="am-u-sm-16 am-u-md-8 am-u-end" >
					      	<label class="am-radio am-radio-inline  am-text-meddle" >
						        <input type="radio" class="" name="status" id="edit_status1" value="1"  checked> 启用
						    </label>
						    <label class="am-radio am-radio-inline am-text-meddle">
						        <input type="radio" name="status" id="edit_status2" value="0"   > 停用
						    </label>
						  </div>		      
					    </div>
					    
					    <div class="am-form-group">
					    	<label for="edit_remark" class="am-u-sm-8 am-u-md-4 am-form-label">备注</label>
					    	<div class="am-u-sm-24 am-u-md-8 am-u-end">
					    		<textarea class="" rows="3" id="edit_remark" name="remark"></textarea>
					    	</div>
					    </div>
					    
					    <p><hr/></p>
					    <div class="am-g">
					    	<div class="am-u-sm-8 am-u-md-4">&nbsp;</div>
					    	<div class="am-u-sm-16 am-u-md-8 am-u-end">
					    		<button type="submit" class="am-btn am-btn-primary am-disabled" >  保  存  </button>
					    		<button type="button" class="am-btn am-btn-default btn-loading-example" id="cancelBtn" >  取 消  </button>
					    	</div>
					    </div>
			  	  </form>
  				</div>
  			</div>
  		</div>
  	</div>
  	 
  </div>
  
  
</div>
<script type="text/javascript">

</script>
</body>
</html>